//
//  CustomBtn.swift
//  Exchange
//
//  Created by 孟祥群 on 2018/5/22.
//  Copyright © 2018年 common. All rights reserved.
//

import UIKit
enum placeStyle {
    case styleCommon
    case styleLeft
    case styleRight
}
class CustomBtn: UIButton {
    lazy var photoImageView: UIImageView = {
        let imageView = UIImageView()
        return imageView
    }()
    
    lazy var nameLabel: BaseLabel = {
        let label = BaseLabel(style: .oneStyle)
        return label
    }()
    var position:PlacePosition?
    
    init(style:placeStyle) {
        super.init(frame:CGRect.zero)
        if style == .styleLeft {
            position = PlaceLeft()
        }else {
            position = PlaceRight()
        }
        self.addSubview(nameLabel)
        self.addSubview(photoImageView)
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        self.addSubview(nameLabel)
        self.addSubview(photoImageView)
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    /*
    // Only override draw() if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func draw(_ rect: CGRect) {
        // Drawing code
    }
    */

}
